package com.zy.modules.sys.repo;

import com.zy.modules.sys.dao.BDaoImpl;
import com.zy.modules.sys.entity.SysConfigEntity;
import org.springframework.stereotype.Component;

/**
 * <p></p>
 * Created by zhezhiyong@163.com on 2017/7/26.
 */
@Component
public class ConfigDaoImpl extends BDaoImpl<SysConfigEntity> implements ConfigDao {
    @Override
    public int update(String key, String value) {
        String sql = "UPDATE sys_config SET value = :value WHERE key = :key";
        entityManager.createNativeQuery(sql).setParameter("key", key).setParameter("value", value);
        return 0;
    }
}
